home *** CD-ROM | disk | FTP | other *** search
/ CSi Master: Ableton Live 5 / CSi Master: Ableton Live 5.iso / pc / rsrc / locrsrc / controller.dir / Internal_53_Volume Down Button.ls < prev    next >
Encoding:
Text File  |  2004-12-29  |  1.0 KB  |  41 lines

  1. on mouseDown
  2.   set the member of sprite the clickOn to member("volume down dn")
  3.   updateStage()
  4.   vStartTime = the timer
  5.   vLevel = the soundLevel
  6.   if vLevel > 0 then
  7.     vLevel = vLevel - 1
  8.     set the member of sprite 22 to member("vol" && vLevel)
  9.     updateStage()
  10.   end if
  11.   repeat while the stillDown
  12.     if (vStartTime + 60) < the timer then
  13.       repeat while the stillDown
  14.         vStartTime2 = the timer
  15.         if vLevel > 0 then
  16.           vLevel = vLevel - 1
  17.           set the member of sprite 22 to member("vol" && vLevel)
  18.           updateStage()
  19.         end if
  20.         repeat while the timer < (vStartTime2 + (0.25 * 60))
  21.           nothing()
  22.         end repeat
  23.       end repeat
  24.     end if
  25.   end repeat
  26.   set the soundLevel to vLevel
  27.   puppetSound("volume beep")
  28.   set the member of sprite the clickOn to member("volume down up")
  29.   updateStage()
  30. end
  31.  
  32. on mouseEnter
  33.   set the member of sprite 23 to member("vol down prompt")
  34.   updateStage()
  35. end
  36.  
  37. on mouseLeave
  38.   set the member of sprite 23 to member("blank prompt")
  39.   updateStage()
  40. end
  41.